<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!-- 页面 -->
<div class="row">
	<div class="col-md-6">
	<li>第<span>${page.pageNum}</span>页/共<span>${page.pages}</span>页,共有<span>${page.total}</span>条数据&nbsp;&nbsp;&nbsp;
	</li></div>
	<div class="col-md-6">
		<nav aria-label="Page navigation">
			<ul class="pagination">
				<li><a
					href="${pageContext.request.contextPath}/show.action?pn=1">首页</a></li>
				<c:if test="${page.hasPreviousPage}">
					<li><a
						href="${pageContext.request.contextPath}/show.action?pn=${page.pageNum-1}"
						aria-label="Previous"> <span aria-hidden="true">&laquo;</span>
					</a></li>
				</c:if>
				<c:forEach items="${page.navigatepageNums}" var="p">
					<c:if test="${page.pageNum==p}">
						<li><a
							href="${pageContext.request.contextPath}/show.action?pn=${p}">
								&nbsp;<font style="color: red;">${p}</font>
						</a></li>
					</c:if>
					<c:if test="${page.pageNum!=p}">
						<li><a
							href="${pageContext.request.contextPath}/show.action?pn=${p}">&nbsp;${p}</a>
						</li>
					</c:if>
				</c:forEach>

				<c:if test="${page.hasNextPage}">
					<li><a
						href="${pageContext.request.contextPath}/show.action?pn=${page.pageNum+1}"
						aria-label="Next"> <span aria-hidden="true">&raquo;</span>
					</a></li>
				</c:if>
				<li><a
					href="${pageContext.request.contextPath}/show.action?pn=${page.pages}">尾页</a></li>
			</ul>
		</nav>
	</div>
</div>